package com.xd.springboot.controller;

import com.xd.springboot.entity.JsonResult;
import com.xd.springboot.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @GetMapping("/getUser/{id}")
    public JsonResult<User> getUserInfo(@PathVariable Long id)
    {
        User user = new User(id,"测试","11111");
        return new JsonResult<>(user);
    }

}
